package cn.admin.remoting;

import java.util.List;
import java.util.Map;
import java.util.concurrent.Executor;

public interface ResponseCallback {

    Executor getExecutor();

    void handleResponse(Object appResp);

    void onRemotingException(int errorType, String errorMsg);

    interface ResponseCallbackExtends extends ResponseCallback {

        void onRemotingException(int errorType, String errorMsg, Object object);

    }

    interface GroupRandomResponseCallback {

        Executor getExecutor();

        void handleResponses(Map<String, ResponseOfRequest> response, Object... args);

    }

    interface MultiResponseCallback {

        Executor getExecutor();

        void onMultiResponse(List<ResponseOfRequest> response);

    }

}
